//给滑动条添加事件
$('.spanB').mouseenter(function () {
	$($(this).parent().children()[2]).animate({
		left:$('.blind').width() * ($(this).index()-3)
	},50)
});
//给td添加移入事件
$('td').mouseenter(function () {
	$($($(this).children()[0]).children()[1]).slideDown();
});
$('td').mouseleave(function () {
	$('.td_top p').hide();
});

//添加移入事件切换图片路径
$('#jpWoman').mouseenter(function () {
	$('.td_top_img').attr('src','img/y_img/car3.gif');
});
$('#jpMan').mouseenter(function () {
	$('.td_top_img').attr('src','img/y_img/car7.gif');
});
$('#y_hot').mouseenter(function () {
	$('.td_top_img').attr('src','img/y_img/car6.gif');
});

$('#jpWoman2').mouseenter(function () {
	$('.td_top_img2').attr('src','img/y_img/jiudian7.gif');
});
$('#jpMan2').mouseenter(function () {
	$('.td_top_img2').attr('src','img/y_img/jiudian8.gif');
});
$('#y_hot2').mouseenter(function () {
	$('.td_top_img2').attr('src','img/y_img/jiudian9.gif');
});

$('#jpWoman3').mouseenter(function () {
	$('.td_top_img3').attr('src','img/y_img/man4.gif');
});
$('#jpMan3').mouseenter(function () {
	$('.td_top_img3').attr('src','img/y_img/man5.gif');
});
$('#y_hot3').mouseenter(function () {
	$('.td_top_img3').attr('src','img/y_img/man3.gif');
});

$('#jpWoman4').mouseenter(function () {
	$('.td_top_img4').attr('src','img/y_img/jiancai4.gif');
});
$('#jpMan4').mouseenter(function () {
	$('.td_top_img4').attr('src','img/y_img/jiancai6.gif');
});
$('#y_hot4').mouseenter(function () {
	$('.td_top_img4').attr('src','img/y_img/jiancai7.gif');
});

//商店图片的动画
$('.dianpuImg').mouseenter(function () {
	$(this).css({
		transform:'rotateZ(15deg)',
		transition: 'ease-in 0.2s'
	});
});
$('.dianpuImg').mouseleave(function () {
	$(this).css({
		transform:'rotateZ(0deg)',
		transition: 'ease-in 0.2s'
	});
});


//右边的分栏
$('.right_building li').mouseenter(function () {
	$(this).css({
		backgroundColor:'rgb(0,140,225)',
		color:'white'
	}).siblings().css({
		backgroundColor:'',
		color:''
	});
});

//回到顶部的点击事件
$('.li_top').click(function () {
	$('body').animate({scrollTop:'0px'},600);
	setTimeout(function () {
		$('.right_building').fadeOut();

	},150);	

});

$('.one_F').click(function () {
	$('body').animate({scrollTop:'900px'},600);
});

$('.two_F').click(function () {
	$('body').animate({scrollTop:'1370px'},600);
});

$('.Three_F').click(function () {
	$('body').animate({scrollTop:'2155px'},600);
});

$('.Four_F').click(function () {
	$('body').animate({scrollTop:'2943px'},600);
});

$('.five_F').click(function () {
	$('body').animate({scrollTop:'3730px'},600);
});


//滚轮事件的兼容 兼容火狐浏览器
		if (window.navigator.userAgent.indexOf('Firefox') != -1) {
			//火狐浏览器下的滚轮事件
			document.addEventListener("DOMMouseScroll",function (e) {
                var event1 = window.event  || e;
                console.log(event1.detail);                
                if ($('body').scrollTop() > 1100) {
                	   $('.right_building').fadeIn();
                }else{
                		$('.right_building').fadeOut();
                }
			},false);
			
		}else{
			//onmousewheel  滚轮事件  非火狐浏览器事件
			document.onmousewheel = function  (e) {
				var event1 = window.event  || e;
                if ($('body').scrollTop() > 1100) {
                	   $('.right_building').fadeIn();
                }else{
                		$('.right_building').fadeOut();
                }
			}			
		}


